#include <Game/Include/TimeGameEvent.h>

TimeGameEvent::TimeGameEvent(int delta_time_ms)
    :GameEvent(GameEventType::TIME_EVENT)
{
    this->delta_time_ms = delta_time_ms;
}

TimeGameEvent::TimeGameEvent(std::istream &s)
    :GameEvent(s)
{
    ISerializable::read(s, this->delta_time_ms);
}

TimeGameEvent::~TimeGameEvent(void)
{
}

unsigned int TimeGameEvent::serialize(std::ostream &s)
{
    unsigned int bytes_written = GameEvent::serialize(s);
    bytes_written += ISerializable::write(s, this->delta_time_ms);
    return bytes_written;
}

int TimeGameEvent::getDeltaTimeMs() const
{
    return this->delta_time_ms;
}
